<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>跨域资源共享 CORS</title>
    <script src="http://cdn.static.runoob.com/libs/jquery/2.1.1/jquery.min.js"></script>
</head>
<body>
<script>
    var url = 'http://101.200.59.92/cors.php';
   //  var xhl = new XMLHttpRequest();
   //  xhl.open('post', url, true);
   //  // xhr.setRequestHeader('X-Custom-Header', 'value')
   // xhl.send();
   $.ajax({
       url: url,
       // dataType: 'json',
       type: 'post',
       data: {a:'aaa'},
       cache: false,
       async: true,
       beforeSend: function (XMLHttpRequest) {

       },
       complete: function (XMLHttpRequest) {

       },
       success: function (json) {
            console.log('json');
       },
       error: function () {

       }
   });
</script>
</body>
</html>